Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Improve session state reliability #1971

Merged
merged 1 commit into from
Nov 9, 2024
Merged

Conversation

MoritzWeber0
Copy link
Member

@MoritzWeber0 MoritzWeber0 commented Nov 8, 2024

Important

Sessions created before this update can't be terminated after the update anymore! Make sure to terminate all sessions before the update or clean the objects in Kubernetes manually.

  • Instead of a str, the API returns a fixed set of available states. This makes handling in other application and the frontend easier.
  • A separate attribute "preparation_state" is returned, indicating the status of the session preparation.
  • Sessions no longer spawn deployments, Pods are directly created instead. This avoids unwanted restarts of containers.
  • The app label on workloads has been replaced with capellacollab/session-id
  • Logs and events are no longer considered for the session state.

This was linked to issues Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

The generated OpenAPI client is not up to date with the latest changes in the OpenAPI specification.
Please run make openapi locally and commit the changes.

Copy link

github-actions bot commented Nov 8, 2024

API Changelog 4.11.1.dev10+gf919a9b6

GET /api/v1/sessions

  • ⚠️ added the new 'Failed' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'NotFound' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Pending' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Running' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Terminated' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Unknown' enum value to the '/items/state' response property for the response status '200'
  • added the required property '/items/preparation_state' to the response with the '200' status

POST /api/v1/sessions

  • ⚠️ added the new 'Failed' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'NotFound' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Pending' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Running' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Terminated' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Unknown' enum value to the 'state' response property for the response status '200'
  • added the required property 'preparation_state' to the response with the '200' status

GET /api/v1/sessions/{session_id}

  • ⚠️ added the new 'Failed' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'NotFound' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Pending' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Running' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Terminated' enum value to the 'state' response property for the response status '200'
  • ⚠️ added the new 'Unknown' enum value to the 'state' response property for the response status '200'
  • added the required property 'preparation_state' to the response with the '200' status

GET /api/v1/users/{user_id}/sessions

  • ⚠️ added the new 'Failed' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'NotFound' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Pending' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Running' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Terminated' enum value to the '/items/state' response property for the response status '200'
  • ⚠️ added the new 'Unknown' enum value to the '/items/state' response property for the response status '200'
  • added the required property '/items/preparation_state' to the response with the '200' status

@MoritzWeber0 MoritzWeber0 force-pushed the improve-session-state branch from 1a855cb to d0a71b1 Compare November 8, 2024 15:24
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 84.26966% with 14 lines in your changes missing coverage. Please review.

Project coverage is 84.78%. Comparing base (b6f1bf2) to head (6074fe6).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
backend/capellacollab/sessions/operators/k8s.py 80.28% 9 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1971      +/-   ##
==========================================
+ Coverage   84.76%   84.78%   +0.02%     
==========================================
  Files         211      211              
  Lines        6923     6934      +11     
  Branches      478      482       +4     
==========================================
+ Hits         5868     5879      +11     
- Misses        890      893       +3     
+ Partials      165      162       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This comment has been minimized.

Copy link

github-actions bot commented Nov 8, 2024

A Storybook preview is available for commit f919a9b.
➡️ View Storybook
➡️ View Chromatic build

@MoritzWeber0 MoritzWeber0 marked this pull request as ready for review November 8, 2024 15:28
@MoritzWeber0 MoritzWeber0 linked an issue Nov 8, 2024 that may be closed by this pull request
@MoritzWeber0 MoritzWeber0 force-pushed the improve-session-state branch from d0a71b1 to f319475 Compare November 8, 2024 15:58

This comment has been minimized.

@MoritzWeber0 MoritzWeber0 force-pushed the improve-session-state branch from f319475 to 429aaa5 Compare November 8, 2024 16:07

This comment has been minimized.

@MoritzWeber0 MoritzWeber0 force-pushed the improve-session-state branch from 429aaa5 to ae516a5 Compare November 8, 2024 16:11

This comment has been minimized.

@MoritzWeber0 MoritzWeber0 force-pushed the improve-session-state branch from ae516a5 to 9048b19 Compare November 8, 2024 16:21

This comment has been minimized.

@MoritzWeber0 MoritzWeber0 changed the title feat: Improve session state reliability feat!: Improve session state reliability Nov 8, 2024
@MoritzWeber0 MoritzWeber0 force-pushed the improve-session-state branch from 9048b19 to 0711948 Compare November 8, 2024 16:26

This comment has been minimized.

- Instead of a str, the API returns a fixed set of available states.
  This makes handling in other application and the frontend easier.
- A separate attribute "preparation_state" is returned, indicating
  the status of the session preparation.
- Sessions no longer spawn deployments, Pods are directly created instead.
  This avoids unwanted restarts of containers.
- The `app` label on workloads has been replaced with `capellacollab/session-id`
- The logs are no longer considered for the session state.

BREAKING CHANGE: Sessions created before this update can't be terminated
anymore! Make sure to terminate all sessions before the update or
clean the objects in Kubernetes manually.
@MoritzWeber0 MoritzWeber0 force-pushed the improve-session-state branch from 0711948 to 6074fe6 Compare November 8, 2024 16:38
Copy link

sonarcloud bot commented Nov 8, 2024

Copy link

github-actions bot commented Nov 8, 2024

This report was generated by comparing f919a9b with b6f1bf2.
If you would like to check difference, please check here.

change detected

ArtifactName: reg

item count
pass 308
change 14
new 20
delete 28
📝 Report

Differences

Session Components_Active Sessions_Session Shared With User_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Active Sessions_Session Shared With User_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_Active Sessions_Session Sharing Enabled_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Active Sessions_Session Sharing Enabled_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_Active Sessions_Session With Feedback Enabled_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Active Sessions_Session With Feedback Enabled_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_Active Sessions_Shared Session_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Active Sessions_Shared Session_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_Session Overview_All Selected_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Session Overview_Loading_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Session Overview_Loading_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_Session Overview_No Sessions_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Session Overview_No Sessions_mobile.png

actual Actual
expected Expected
difference Difference

Session Components_Session Overview_Overview_desktop.png

actual Actual
expected Expected
difference Difference

New Items

Session Components_Active Sessions_Loading_desktop.png

NewItem

Session Components_Active Sessions_Loading_mobile.png

NewItem

Session Components_Active Sessions_Readonly Session Success State_desktop.png

NewItem

Session Components_Active Sessions_Readonly Session Success State_mobile.png

NewItem

Session Components_Active Sessions_Session Failed State_desktop.png

NewItem

Session Components_Active Sessions_Session Failed State_mobile.png

NewItem

Session Components_Active Sessions_Session Not Found State_desktop.png

NewItem

Session Components_Active Sessions_Session Not Found State_mobile.png

NewItem

Session Components_Active Sessions_Session Pending State_desktop.png

NewItem

Session Components_Active Sessions_Session Pending State_mobile.png

NewItem

Session Components_Active Sessions_Session Preparation Pending State_desktop.png

NewItem

Session Components_Active Sessions_Session Preparation Pending State_mobile.png

NewItem

Session Components_Active Sessions_Session Preparation Running State_desktop.png

NewItem

Session Components_Active Sessions_Session Preparation Running State_mobile.png

NewItem

Session Components_Active Sessions_Session Running State_desktop.png

NewItem

Session Components_Active Sessions_Session Running State_mobile.png

NewItem

Session Components_Active Sessions_Session Terminated State_desktop.png

NewItem

Session Components_Active Sessions_Session Terminated State_mobile.png

NewItem

Session Components_Active Sessions_Session Unknown State_desktop.png

NewItem

Session Components_Active Sessions_Session Unknown State_mobile.png

NewItem

Deleted Items

Session Components_Active Sessions_Loading Story_desktop.png

DeleteItem

Session Components_Active Sessions_Loading Story_mobile.png

DeleteItem

Session Components_Active Sessions_Readonly Session Success State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Readonly Session Success State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Error State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Error State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Failed Scheduling State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Failed Scheduling State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Killing State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Killing State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Network Issues State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Network Issues State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Pulled State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Pulled State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Pulling State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Pulling State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Queued State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Queued State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Scheduled State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Scheduled State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Stopped State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Stopped State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Success State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Success State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Unknown State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Unknown State Story_mobile.png

DeleteItem

Session Components_Active Sessions_Session Warning State Story_desktop.png

DeleteItem

Session Components_Active Sessions_Session Warning State Story_mobile.png

DeleteItem

@MoritzWeber0 MoritzWeber0 merged commit aefb522 into main Nov 9, 2024
30 of 31 checks passed
@MoritzWeber0 MoritzWeber0 deleted the improve-session-state branch November 9, 2024 10:47
@MoritzWeber0 MoritzWeber0 linked an issue Nov 9, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant